<template>
    <div>
        <div class="container">
            <div class="handle-box">
                <el-button
                    id="asd3"
                    type="primary"
                    icon="el-icon-lx-friendadd"
                    class="handle-del mr10"
                    @click="insertEmp()"
                >新增档案
                </el-button>
                <el-button
                id="asd"
                type="primary"
                icon="el-icon-delete"
                class="handle-del mr10"
                @click="deleteEmpMore"
                >批量删除
            </el-button>
            <el-button
                id="asd2"
                type="primary"
                icon="el-icon-lx-forward"
                class="handle-del mr10"
                @click="backEmpMore()"
                >批量恢复
            </el-button>
                
                <el-input v-model="query.empName" placeholder="员工姓名" class="handle-input mr10"></el-input>
                <el-select class="handle-select mr10" v-model="idxixi" placeholder="请选择部门">
                    <el-option v-for="item in query.deptInfo"
                    :key=item.deptId
                    :value=item.deptId
                    :label=item.deptName>{{item.deptName}}</el-option>
                </el-select> 
                <el-button type="primary" icon="el-icon-search" @click="selectEmp()">搜索</el-button>
                <el-button type="primary" icon="el-icon-refresh" @click="resetEmp()">重置</el-button>
            </div>


            <el-table
                :data="tableData"
                border
                class="table"
                ref="multipleTable"
                header-cell-class-name="table-header"
                @selection-change="handleSelectionChange">
                
                <el-table-column type="selection" width="40" align="center"></el-table-column>
                <el-table-column prop="empId" label="员工ID" align="center"></el-table-column>
                <el-table-column prop="dept.deptName" label="部门"></el-table-column>
                <el-table-column prop="empStatus.empStatusName" label="员工状态"></el-table-column>
                <el-table-column prop="empName" label="姓名"></el-table-column>
                <el-table-column prop="empSex" label="性别"></el-table-column>
                <el-table-column prop="empAge" label="年龄"></el-table-column>
                <el-table-column prop="empEducation" label="学历"></el-table-column>
                <el-table-column prop="empPhone" label="电话"></el-table-column>
                <el-table-column prop="empAddress" label="住址"></el-table-column>     
                <el-table-column prop="empCheckStatus" label="审核状态"></el-table-column>
                <!-- <el-table-column label="照片" align="center">
                    <template slot-scope="scope">
                        <el-image
                            class="table-td-thumb"
                            :src="scope.row.thumb"
                            :preview-src-list="[scope.row.thumb]"
                        ></el-image>
                    </template>
                </el-table-column> -->
                <el-table-column label="操作" width="200" align="center">
                    <template slot-scope="scope">
                        <el-button
                            type="text"
                            icon="el-icon-lx-comment"
                            @click="openFileForDetails(scope.$index, scope.row)"
                        >详情</el-button>
                        <el-button
                            type="text"
                            icon="el-icon-edit"
                            @click="openUpdate(scope.$index, scope.row)"
                        >编辑</el-button>
                        <el-button
                            type="text"
                            icon="el-icon-lx-comment"
                            @click="submitEmp(scope.$index, scope.row)"
                        >提交审核</el-button>
                        <el-button
                            type="text"
                            icon="el-icon-delete"
                            class="red"
                            @click="DeleteEmpStatus(scope.$index, scope.row)"
                        >删除</el-button>
                        <el-button
                            type="text"
                            icon="el-icon-lx-forward"
                            class="red"
                            @click="DeleteEmpStatus2(scope.$index, scope.row)"
                        >恢复</el-button>
                    </template>
                </el-table-column>
            </el-table>

        <!-- 档案详情弹出框 -->
        <el-dialog title="档案详情" :visible.sync="archives" width="45%">
            <el-form ref="form" :model="form" label-width="90px">
                <el-form-item label="员工ID">
                    <el-input v-model="form.empId"></el-input>
                </el-form-item>
                <el-form-item label="姓名">
                    <el-input v-model="form.empName"></el-input>
                </el-form-item>
                <el-form-item label="部门">
                    <el-input v-model="form.deptName"></el-input>
                </el-form-item>
                <el-form-item label="员工状态">
                    <el-input v-model="form.empStatusName"></el-input>
                </el-form-item>
                <el-form-item label="性别">
                    <el-input v-model="form.empSex"></el-input>
                </el-form-item>
                <el-form-item label="年龄">
                    <el-input v-model="form.empAge"></el-input>
                </el-form-item>
                <el-form-item label="生日">
                    <el-input v-model="form.empBirthday"></el-input>
                </el-form-item>
                <el-form-item label="学历">
                    <el-input v-model="form.empEducation"></el-input>
                </el-form-item>
                <el-form-item label="专业">
                    <el-input v-model="form.empMajor"></el-input>
                </el-form-item>
                <el-form-item label="邮箱">
                    <el-input v-model="form.empEmail"></el-input>
                </el-form-item>
                <el-form-item label="电话">
                    <el-input v-model="form.empPhone"></el-input>
                </el-form-item>
                <el-form-item label="QQ">
                    <el-input v-model="form.empQqno"></el-input>
                </el-form-item>
                <el-form-item label="国籍">
                    <el-input v-model="form.empCountry"></el-input>
                </el-form-item>
                <el-form-item label="民族">
                    <el-input v-model="form.empEthnic"></el-input>
                </el-form-item>
                <el-form-item label="政治面貌">
                    <el-input v-model="form.empPoliticsStatus"></el-input>
                </el-form-item>
                <el-form-item label="住址">
                    <el-input v-model="form.empAddress"></el-input>
                </el-form-item>
                <el-form-item label="邮政编码">
                    <el-input v-model="form.empPostcode"></el-input>
                </el-form-item>
                <el-form-item label="出生地">
                    <el-input v-model="form.empBirthplace"></el-input>
                </el-form-item>
                <el-form-item label="身份证号码">
                    <el-input v-model="form.empIdCard"></el-input>
                </el-form-item>
                <el-form-item label="社保账号">
                    <el-input v-model="form.empSocialNo"></el-input>
                </el-form-item>
                <el-form-item label="开户行">
                    <el-input v-model="form.empBank"></el-input>
                </el-form-item>
                <el-form-item label="银行卡号">
                    <el-input v-model="form.empBankCard"></el-input>
                </el-form-item>
                <el-form-item label="登记人">
                    <el-input v-model="form.empRegister"></el-input>
                </el-form-item>
                <el-form-item label="登记时间">
                    <el-input v-model="form.empRegistTime"></el-input>
                </el-form-item>
                <el-form-item label="爱好">
                    <el-input v-model="form.empHobby"></el-input>
                </el-form-item>
                <el-form-item label="特长">
                    <el-input v-model="form.empSpeciality"></el-input>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="archives = false">关 闭</el-button>
            </span>
        </el-dialog>



        <!-- 编辑弹出框 -->
        <el-dialog title="修改档案" :visible.sync="updateEmpinfo" width="45%">
            <el-form ref="form" :model="form" label-width="90px">
                <el-form-item label="姓名">
                    <el-input v-model="form.empName"></el-input>
                </el-form-item>
                <el-form-item label="性别">
                    <el-select v-model="form.empSex" placeholder="请选择性别" class="handle-select mr10">
                        <el-option key="1" value="男"></el-option>
                        <el-option key="2" value="女"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="年龄">
                    <el-input v-model="form.empAge"></el-input>
                </el-form-item>
                <el-form-item label="生日">
                    <el-input v-model="form.empBirthday"></el-input>
                </el-form-item>
                <el-form-item label="学历">
                    <el-select v-model="form.empEducation" placeholder="请选择学历" class="handle-select mr10">
                        <el-option key="1" value="博士"></el-option>
                        <el-option key="2" value="硕士"></el-option>
                        <el-option key="3" value="本科"></el-option>
                        <el-option key="4" value="大专"></el-option>
                        <el-option key="5" value="高中"></el-option>
                        <el-option key="6" value="其他"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="专业">
                    <el-input v-model="form.empMajor"></el-input>
                </el-form-item>
                <el-form-item label="邮箱">
                    <el-input v-model="form.empEmail"></el-input>
                </el-form-item>
                <el-form-item label="电话">
                    <el-input v-model="form.empPhone"></el-input>
                </el-form-item>
                <el-form-item label="QQ">
                    <el-input v-model="form.empQqno"></el-input>
                </el-form-item>
                <el-form-item label="国籍">
                    <el-select v-model="form.empCountry" placeholder="请选择国籍" class="handle-select mr10">
                        <el-option aria-selected="selected" key="1" value="中国"></el-option>
                        <el-option key="2" value="美国"></el-option>
                        <el-option key="3" value="日本"></el-option>
                        <el-option key="4" value="英国"></el-option>
                        <el-option key="5" value="法国"></el-option>
                        <el-option key="6" value="其他"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="民族">
                    <el-select v-model="form.empEthnic" placeholder="请选择民族" class="handle-select mr10">
                        <el-option selected="selected" key="1" value="汉族"></el-option>
                        <el-option key="2" value="维吾尔"></el-option>
                        <el-option key="3" value="回族"></el-option>
                        <el-option key="4" value="满族"></el-option>
                        <el-option key="5" value="蒙古族"></el-option>
                        <el-option key="6" value="其他"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="政治面貌">
                    <el-select v-model="form.empPoliticsStatus" placeholder="请选择" class="handle-select mr10">
                        <el-option key="1" value="党员"></el-option>
                        <el-option key="2" value="团员"></el-option>
                        <el-option key="3" value="群众"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="住址">
                    <el-input v-model="form.empAddress"></el-input>
                </el-form-item>
                <el-form-item label="邮政编码">
                    <el-input v-model="form.empPostcode"></el-input>
                </el-form-item>
                <el-form-item label="出生地">
                    <el-input v-model="form.empBirthplace"></el-input>
                </el-form-item>
                <el-form-item label="身份证号码">
                    <el-input v-model="form.empIdCard"></el-input>
                </el-form-item>
                <el-form-item label="社保账号">
                    <el-input v-model="form.empSocialNo"></el-input>
                </el-form-item>
                <el-form-item label="开户行">
                    <el-input v-model="form.empBank"></el-input>
                </el-form-item>
                <el-form-item label="银行卡号">
                    <el-input v-model="form.empBankCard"></el-input>
                </el-form-item>
                <el-form-item label="登记人">
                    <el-input v-model="form.empRegister"></el-input>
                </el-form-item>
                <el-form-item label="登记时间">
                    <el-input v-model="form.empRegistTime"></el-input>
                </el-form-item>
                <el-form-item label="爱好">
                    <el-input v-model="form.empHobby"></el-input>
                </el-form-item>
                <el-form-item label="特长">
                    <el-input v-model="form.empSpeciality"></el-input>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="updateEmpinfo = false">取 消</el-button>
                <el-button type="primary" @click="updateEmp()">确 定</el-button>
            </span>
        </el-dialog>

        <!-- 新增档案弹出框 -->
        <el-dialog title="新增档案" :visible.sync="insertEmpinfo" width="45%">
            <el-form ref="form2" :model="form2" label-width="90px">
                <el-form-item label="姓名">
                    <el-input v-model="form2.empName"></el-input>
                </el-form-item>
                <el-form-item label="部门">
                    <el-select class="handle-select mr10" v-model="idhaha" placeholder="请选择部门">
                        <el-option v-for="item in query.deptInfo" 
                        :key=item.deptId
                        :value=item.deptId
                        :label=item.deptName>{{item.deptName}}</el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="性别">
                    <el-select v-model="form2.empSex" placeholder="请选择性别" class="handle-select mr10">
                        <el-option key="1" value="男"></el-option>
                        <el-option key="2" value="女"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="年龄">
                    <el-input v-model="form2.empAge"></el-input>
                </el-form-item>
                <el-form-item label="生日">
                    <el-input v-model="form2.empBirthday"></el-input>
                </el-form-item>
                <el-form-item label="学历">
                    <el-select v-model="form2.empEducation" placeholder="请选择学历" class="handle-select mr10">
                        <el-option key="1" value="博士"></el-option>
                        <el-option key="2" value="硕士"></el-option>
                        <el-option key="3" value="本科"></el-option>
                        <el-option key="4" value="大专"></el-option>
                        <el-option key="5" value="高中"></el-option>
                        <el-option key="6" value="其他"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="专业">
                    <el-input v-model="form2.empMajor"></el-input>
                </el-form-item>
                <el-form-item label="邮箱">
                    <el-input v-model="form2.empEmail"></el-input>
                </el-form-item>
                <el-form-item label="电话">
                    <el-input v-model="form2.empPhone"></el-input>
                </el-form-item>
                <el-form-item label="QQ">
                    <el-input v-model="form2.empQqno"></el-input>
                </el-form-item>
                <el-form-item label="国籍">
                    <el-select v-model="form2.empCountry" placeholder="请选择国籍" class="handle-select mr10">
                        <el-option aria-selected="selected" key="1" value="中国"></el-option>
                        <el-option key="2" value="美国"></el-option>
                        <el-option key="3" value="日本"></el-option>
                        <el-option key="4" value="英国"></el-option>
                        <el-option key="5" value="法国"></el-option>
                        <el-option key="6" value="其他"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="民族">
                    <el-select v-model="form2.empEthnic" placeholder="请选择民族" class="handle-select mr10">
                        <el-option selected="selected" key="1" value="汉族"></el-option>
                        <el-option key="2" value="维吾尔"></el-option>
                        <el-option key="3" value="回族"></el-option>
                        <el-option key="4" value="满族"></el-option>
                        <el-option key="5" value="蒙古族"></el-option>
                        <el-option key="6" value="其他"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="政治面貌">
                    <el-select v-model="form2.empPoliticsStatus" placeholder="请选择" class="handle-select mr10">
                        <el-option key="1" value="党员"></el-option>
                        <el-option key="2" value="团员"></el-option>
                        <el-option key="3" value="群众"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="住址">
                    <el-input v-model="form2.empAddress"></el-input>
                </el-form-item>
                <el-form-item label="邮政编码">
                    <el-input v-model="form2.empPostcode"></el-input>
                </el-form-item>
                <el-form-item label="出生地">
                    <el-input v-model="form2.empBirthplace"></el-input>
                </el-form-item>
                <el-form-item label="身份证号码">
                    <el-input v-model="form2.empIdCard"></el-input>
                </el-form-item>
                <el-form-item label="社保账号">
                    <el-input v-model="form2.empSocialNo"></el-input>
                </el-form-item>
                <el-form-item label="开户行">
                    <el-input v-model="form2.empBank"></el-input>
                </el-form-item>
                <el-form-item label="银行卡号">
                    <el-input v-model="form2.empBankCard"></el-input>
                </el-form-item>
                <el-form-item label="登记人">
                    <el-input v-model="form2.empRegister"></el-input>
                </el-form-item>
                <el-form-item label="登记时间">
                    <el-input v-model="form2.empRegistTime"></el-input>
                </el-form-item>
                <el-form-item label="爱好">
                    <el-input v-model="form2.empHobby"></el-input>
                </el-form-item>
                <el-form-item label="特长">
                    <el-input v-model="form2.empSpeciality"></el-input>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="insertEmpinfo = false">取 消</el-button>
                <el-button type="primary" @click="saveEmp">确 定</el-button>
            </span>
        </el-dialog>

            <!-- 分页 -->
            <div class="page">
                 <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
                 :current-page="currentPage" :page-sizes="[1, 3, 5, 10,]" :page-size="pageSize"
                 layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
            </div>
        </div>
    </div>
</template>



<script>
import { fetchData } from '../../api/index';
export default {
    name: 'basetable',
    data() {
        return {
            query: {
                empName:"",
                deptInfo:[],
            },
            flag:true,
            currentPage:1,
            pageSize:5,
            total:0,
            tableData: [],
            multipleSelection: [],
            editVisible: false,
            insertEmpinfo:false,
            updateEmpinfo:false,
            archives:false,
            form: {
                empId:"",
                deptId:"",
                empStatusId:"",
                empName:"",
                empSex:"",
                empAge:"",
                empBirthday:"",
                empEducation:"",
                empMajor:"",
                empEmail:"",
                empPhone:"",
                empQqno:"",
                empCountry:"",
                empEthnic:"",
                empPoliticsStatus:"",
                empAddress:"",
                empPostcode:"",
                empBirthplace:"",
                empIdCard:"",
                empSocialNo:"",
                empBank:"",
                empBankCard:"",
                empRegister:"",
                empRegistTime:"",
                empHobby:"",
                empSpeciality:"",
                empCheckStatus:""
            },
            form2:{
                pageSize:"",
                pageNum: ""
            },
            idhaha: '',
            idxixi: ''
        };
    },
    //请求档案数据
    //请求部门信息用于新增档案时回填部门下拉框
    created() {
        this.empList();
        this.$axios.post("/dept/findAllDept").then((response)=>{
            let r = response.data
            this.query.deptInfo = r.data
        })
    },
    methods: {
        //弹出新增档案模态框
        insertEmp(){
            this.insertEmpinfo = true;
        },
        //弹出档案详情模态框并回填
        openFileForDetails(index, row){
            this.archives = true;
            this.form.empId = row.empId;
            this.form.deptName = row.deptName;
            this.form.empStatusName = row.empStatusName;
            this.form.empName = row.empName;
            this.form.empSex = row.empSex;
            this.form.empAge = row.empAge 
            this.form.empBirthday = row.empBirthday
            this.form.empEducation = row.empEducation
            this.form.empMajor = row.empMajor
            this.form.empEmail = row.empEmail
            this.form.empPhone = row.empPhone
            this.form.empQqno = row.empQqno
            this.form.empCountry = row.empCountry
            this.form.empEthnic = row.empEthnic
            this.form.empPoliticsStatus = row.empPoliticsStatus
            this.form.empAddress = row.empAddress
            this.form.empPostcode = row.empPostcode
            this.form.empBirthplace = row.empBirthplace
            this.form.empIdCard = row.empIdCard
            this.form.empSocialNo = row.empSocialNo
            this.form.empBank = row.empBank
            this.form.empBankCard = row.empBankCard
            this.form.empRegister = row.empRegister
            this.form.empRegistTime = row.empRegistTime
            this.form.empHobby = row.empHobby
            this.form.empSpeciality = row.empSpeciality
        },
        //弹出修改档案模态框并回填
        openUpdate(index, row){
            this.updateEmpinfo = true;
            this.form = row;
        },
        //档案列表
        empList(){
            let data={
                "pageNum":this.currentPage,
                "pageSize":this.pageSize
            }
            this.$axios.post("/emp/findAll2",data).then((response) => {
            let emp = response.data;
            this.tableData = emp.data.list;
            this.form = emp.data;
            this.total = emp.data.total
        });
        },
        // 删除操作
        DeleteEmpStatus(index, row) {
            this.$axios.post("/emp/updateStatus",row.empId,{
                headers:{
                    "Content-Type":"text/plain"
                }
            }).then((response)=>{
                let status=response.data
                if(status.msg=="成功"){
                    this.empList();
                    this.$notify({
                        title: '删除成功',
                        message: '此档案已删除',
                        type: 'success'
                    });
                }else{
                    this.$notify.error({
                        title: '错误',
                        message: '不可删除未注销账号的员工档案'
                    });
                }
        })
        },
        //恢复操作
        DeleteEmpStatus2(index, row){
            this.$axios.post("/emp/updateStatus2",row.empId,{
                headers:{
                    "Content-Type":"text/plain"
                }
            }).then((response)=>{
                let status=response.data
                if(status.msg=="成功"){
                   this.$notify({
                        title: '恢复成功',
                        message: '此档案已恢复',
                        type: 'success'
                    });
                    this.empList();
                }
        })
        },
        // 点击确定按钮修改
        updateEmp(){
            this.$axios.post("/emp/update",this.form).then((response)=>{
               let r = response.data
               if(r.status == 0){
                    this.updateEmpinfo = false;
                    this.$message.success(`修改成功`);
                    this.empList();
               }
            })
        },
        //重置搜索条件
        resetEmp(){
            this.idxixi = ""
            this.query.empName = ""
            this.form2.empName = ""
            this.empList();
        },
        //点击确认搜索
        selectEmp(){
             this.form2.pageNum = this.currentPage,
             this.form2.pageSize = this.pageSize
             this.form2.deptId = this.idxixi;
             this.form2.empName = this.query.empName;
             this.$axios.post("emp/findLike",this.form2).then((response) => {
                let e = response.data
                this.tableData = e.data.list
                this.total = e.data.total
                console.log(e.data);
                this.flag = false
                this.form2.empName = ""
                if(e.data.size == 0){
                    this.$message.success(`暂无符合该条件的员工`);
                    this.empList();
                }
             })
        },
        // 点击确定按钮新增
        saveEmp() {
            this.form2.deptId = this.idhaha;
            this.$axios.post("/emp/insert",this.form2).then((response) => {
            let empADD = response.data;
            this.form2 = {
                empId:"",
                deptId:"",
                empStatusId:"",
                empName:"",
                empSex:"",
                empAge:"",
                empBirthday:"",
                empEducation:"",
                empMajor:"",
                empEmail:"",
                empPhone:"",
                empQqno:"",
                empCountry:"",
                empEthnic:"",
                empPoliticsStatus:"",
                empAddress:"",
                empPostcode:"",
                empBirthplace:"",
                empIdCard:"",
                empSocialNo:"",
                empBank:"",
                empBankCard:"",
                empRegister:"",
                empRegistTime:"",
                empHobby:"",
                empSpeciality:"",
                empCheckStatus:""
            };
            if(empADD.msg=="成功"){   
                this.$notify({
                        title: '成功',
                        message: '成功添加一条档案',
                        type: 'success'
                    });
                this.empList();
            }else{
                this.$notify.error({
                        title: '错误',
                        message: empADD.msg,
                    });
            }
            this.insertEmpinfo = false;
            this.idhaha = "";
        });
        },



        handleSearch() {
            this.$set(this.query, 'pageIndex', 1);
            this.getData();
        },
        // 多选操作
        handleSelectionChange(val) {
            this.multipleSelection = val;
        },
        deleteEmpMore(){
            if(this.multipleSelection=[]){
                this.$message.success(`请勾选要删除的档案`);
                return;
            }
            this.$axios.post("emp/deleteMore",this.multipleSelection).then((response)=>{
                let r = response.data;
                if(r.status == 0){
                    this.empList();
                     this.$notify({
                        title: '成功',
                        message: '已删除这批档案',
                        type: 'success'
                    });
                }else{
                    this.empList();
                    this.$notify.error({
                        title: '错误',
                        message: '删除失败,注意是否有未注销账号'
                    });
                }
                this.multipleSelection.clear();
            });
        },
        //批量恢复
        backEmpMore(){
            if(this.multipleSelection=[]){
                this.$message.success(`请勾选要恢复的档案`);
                return;
            }
            this.$axios.post("emp/backMore",this.multipleSelection).then((response)=>{
                let r = response.data
                if(r.status == 0){
                    this.empList();
                     this.$notify({
                        title: '成功',
                        message: '已恢复这批档案',
                        type: 'success'
                    });
                }else{
                    this.empList();
                    this.$notify.error({
                        title: '错误',
                        message: '恢复失败'
                    });
                }
                this.multipleSelection.clear();
            });
        },
        // 分页导航
        //每页显示多少条数据
        handleSizeChange:function(size){
            this.pageSize = size;
            this.currentPage = 1;
            if(this.flag){
              this.empList();
            }else{
              this.selectEmp();
            }
        },
        handleCurrentChange:function(currentPage){
            this.currentPage = currentPage;
            if(this.flag){
                this.empList();
            }else{
              this.selectEmp();
            }
        },
        //档案审核
        submitEmp(index,row){
            this.$axios.post("emp/submit",row).then((response)=>{
                let r = response.data
                console.log(r.data);
                if(r.status == 200){
                    this.$notify({
                        title: '提交成功',
                        message: '等待审核',
                        type: 'success'
                    });
                }else{
                    this.$notify.error({
                        title: '提交失败',
                        message: '避免重复提交'
                    });
                }
                this.empList();
            })
        }
    }
};
</script>



<style scoped>
.handle-box {
    margin-bottom: 20px;
}

.handle-select {
    width: 120px;
}

.handle-input {
    width: 300px;
    display: inline-block;
}
.table {
    width: 100%;
    font-size: 14px;
}
.red {
    color: #ff0000;
}
.mr10 {
    margin-right: 10px;
}
.table-td-thumb {
    display: block;
    margin: auto;
    width: 40px;
    height: 40px;
}
#asd{
    color:red;
}
#asd2{
    color:yellow;
}
#asd3{
    color:chartreuse;
}
</style>
